<?php /* Smarty version 2.6.18, created on 2016-12-14 09:01:09
         compiled from score/analyze.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!--主要内容开始-->
<div class="content-wrapper">
    <section class="content">
        <div class="row">
            <form action="" method="get">
            <section class="col-sm-3 connectedSortable" style="padding-right:0px;">
                <div class="box box-solid">
                    <div class="box-header with-border" id="boring">
                        <div class="form-group">
                            <select id="sem_id" name="semester_id" class="form-control" style="padding:0;">
                                <option>请选择学年学期</option>
                                <?php $_from = $this->_tpl_vars['semester_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                <option value="<?php echo $this->_tpl_vars['value']['semester_id']; ?>
"><?php echo $this->_tpl_vars['value']['semester_name']; ?>
</option>
                                <?php endforeach; endif; unset($_from); ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <select name="exam_id" id="number33" class="form-control" style="padding:0;">
                                <option>请先选择学期</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <select class="form-control" name="grade_id" id="grade_id">
                                <option value="">请选择年级</option>
                                <?php $_from = $this->_tpl_vars['grade_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                <option value="<?php echo $this->_tpl_vars['value']['grade_id']; ?>
"><?php echo $this->_tpl_vars['value']['grade_name']; ?>
</option>
                                <?php endforeach; endif; unset($_from); ?>
                            </select>
                        </div>
                        <div class="form-group class" style="height:100px; overflow-y:scroll;" id="number3">

                        </div>
                    </div>
                </div><!--box box-solid-->

                <div class="box box-solid">
                    <div class="box-header with-border">
                        <label class="col-sm-2" style="padding:0">科目</label>
                        <div class="col-sm-9 form-group" style="height:100px; overflow-y:scroll; margin-bottom:30px;">
                            <label><input type="radio" name="subject_id" value="all"> 总分</label><br/>
                            <?php $_from = $this->_tpl_vars['subject_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                            <label><input type="radio" name="subject_id" value="<?php echo $this->_tpl_vars['value']['subject_id']; ?>
"><?php echo $this->_tpl_vars['value']['subject_name']; ?>
</label><br/>
                            <?php endforeach; endif; unset($_from); ?>
                        </div>
                        <div style="clear:both;">
                            <input type="hidden" name="tptype" value="<?php echo $this->_tpl_vars['tptype']; ?>
">
                            <input type="hidden" name="a" value="score.analyze">
                            <button type="submit" class="btn btn-primary btn-sm">确定查询</button>
                        </div>
                    </div>
                </div><!--box box-solid-->
            </section>
            </form>
            <!--左边结束-->

            <section class="col-lg-9 connectedSortable">
                <div class="box box-default box-solid">
                    <form action="" method="post">
                        <div class="box-header with-border"><?php if ($this->_tpl_vars['tptype'] == 2): ?><?php else: ?><?php endif; ?>
                            <a href="index.php?a=score.analyze&tptype=1" class="btn <?php if ($this->_tpl_vars['tptype'] == 2): ?>btn-default<?php else: ?>btn-primary<?php endif; ?> btn-sm">上级质量分析表</a>
                            <a href="index.php?a=score.analyze&tptype=2" class="btn <?php if ($this->_tpl_vars['tptype'] == 2): ?>btn-primary<?php else: ?>btn-default<?php endif; ?> btn-sm">质量分析表</a>
                            <!--<a href=" " target="_blank" class="btn btn-warning btn-sm" style="float:right; color:#fff; margin-left:10px;">导 出</a>-->
                            <a href=" " class="btn btn-primary btn-sm" style="float:right; color:#fff; margin-left:10px;">打 印</a>
                            <!--<a href=" " class="btn btn-success btn-sm" style="float:right; color:#fff; margin-left:10px;">修 改</a>-->

                        </div>
                        <div class="box-body">
                            <h4 class="text-center"><?php echo $this->_tpl_vars['grade_name']; ?>
<?php echo $this->_tpl_vars['subject_name']; ?>
质量监测分析表</h4>
                            <div class="col-md-4">
                                <p class="text-right">学校：<span><?php echo $this->_tpl_vars['school']['baseset_name']; ?>
</span></p>
                            </div>
                            <div class="col-md-4">
                                <p class="text-center">填表人：<span><?php echo $this->_tpl_vars['username']; ?>
</span></p>
                            </div>
                            <div class="col-md-4">
                                <p class="text-left">填表时间：<span><?php echo $this->_tpl_vars['now']; ?>
</span></p>
                            </div>
                            <div style="width:100%; overflow-x:scroll;">
                                <table class="table table-bordered table-responsive"  id="mytable">

                                    <tr><td>班级</td>
                                        <?php $_from = $this->_tpl_vars['tp']['tp_stat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <td><?php echo $this->_tpl_vars['key']; ?>
</td>
                                        <?php endforeach; endif; unset($_from); ?>
                                        <?php $_from = $this->_tpl_vars['tp']['tp_range']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <td><?php echo $this->_tpl_vars['value']['min']; ?>
~<?php echo $this->_tpl_vars['value']['max']; ?>
</td>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </tr>
                                    <?php $_from = $this->_tpl_vars['all']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <tr>

                                        <?php $_from = $this->_tpl_vars['value']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
                                        <td><?php echo $this->_tpl_vars['v']; ?>
</td>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </tr>
                                    <?php endforeach; endif; unset($_from); ?>

                                    <tr>
                                        <td>合计</td>
                                        <?php $_from = $this->_tpl_vars['aa']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <td><?php echo $this->_tpl_vars['value']; ?>
</td>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </tr>
                                </table>
                            </div>

                            <?php $_from = $this->_tpl_vars['tp']['tp_note']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-md-12 control-label" style="padding-left:0; margin-top:8px;">
                                    <?php echo $this->_tpl_vars['value']; ?>
：
                                </label>
                                <div class="input-group col-md-12">
                                    <textarea name="note[<?php echo $this->_tpl_vars['key']; ?>
]" class="form-control" rows="6"><?php echo $this->_tpl_vars['history'][$this->_tpl_vars['key']]; ?>
</textarea>
                                </div>
                            </div>
                            <?php endforeach; endif; unset($_from); ?>
                            <p>优秀分数线： <?php echo $this->_tpl_vars['youxiu']['min']; ?>
~<?php echo $this->_tpl_vars['youxiu']['max']; ?>
</p>
                            <p>及格分数线： <?php echo $this->_tpl_vars['jige']['min']; ?>
~<?php echo $this->_tpl_vars['jige']['max']; ?>
</p>
                        </div><!--box-body -->
                        <div class="box-footer text-center">
                            <button type="submit" class="btn btn-primary">保 存</button>
                        </div>
                    </form>
                </div><!--box box-default box-solid-->
            </section>
        </div><!--row-->
    </section>
</div>
  <!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script type="text/javascript">
    $(document).ready(function () {
        $("#grade_id").change(function () {
            if ($(this).val() == "-1") {
                $("#industr").remove(); return;
            }
            else {
                var timestamp = new Date().getTime();
                $.ajax({
                    url:"index.php?a=student.gradelistjson",
                    type:"get",
                    data: "grade_id=" + $("#grade_id").find("option:selected").val() + "&timestamp=" + timestamp,
                    dataType:"json",
                    success:function(msg){
//                        <label><input type="checkbox" name="allChecked" id="allChecked" onclick="DoCheck()"> 全选 </label><br/>
//                            <label><input type="checkbox" name="nian[]"> 初一2班（文科班） </label><br/>
                        //实例2个字符串变量来拼接下拉列表
                        var industr = "";
                        //使用jquery解析json中的数据
                        $.each(msg, function (n, value) {
                            industr += ("<label><input type='checkbox' name='nian[]' value=\"" + value.class_id + "\">" + value.class_name);
                            industr += ("</label><br/>");
                        });
                        var top = "<label><input type='checkbox' name='allChecked' id='allChecked' onclick='DoCheck()'> 全选 </label><br/>"
                        $("#number3").html(top+industr);
                    }
                });

            }

        });

    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#sem_id").change(function () {
            if ($(this).val() == "-1") {
                $("#industr2").remove(); return;
            }
            else {
                var timestamp = new Date().getTime();
                $.ajax({
                    url:"index.php?a=score.semjson2",
                    type:"get",
                    data: "sem_id=" + $("#sem_id").find("option:selected").val() + "&timestamp=" + timestamp,
                    dataType:"json",
                    success:function(msg){

                        //实例2个字符串变量来拼接下拉列表
                        var industr = "";
                        //使用jquery解析json中的数据
                        $.each(msg, function (n, value) {
                            industr += ("<option value=\"" + value.exam_id + "\">" + value.exam_name);
                            industr += ("</option>");
                        });

                        $("#number33").html(industr);
                    }
                });

            }

        });

    });
</script>
<script>
    $(function(){
        $(".all").hide();
    })
    function grade_change()
    {
        $(".all").hide();
        var val = $("#number1").val();
        $("#"+val).show();
    }

</script>
<script>
    //checbox全选
    function DoCheck()
    {
        var ch=document.getElementsByName("nian[]");
        if(document.getElementsByName("allChecked")[0].checked==true)
        {
            for(var i=0;i<ch.length;i++)
            {
                ch[i].checked=true;
            }
        }else{
            for(var i=0;i<ch.length;i++)
            {
                ch[i].checked=false;
            }
        }
    }
</script>